package com.example.pourmeacoldone;

import android.os.Bundle;
import android.app.Activity;
import android.content.pm.PackageManager;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		Button b = (Button) findViewById(R.id.hideApp);
		b.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				PackageManager p = getPackageManager();
				p.setComponentEnabledSetting(getComponentName(), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
				Toast.makeText(getBaseContext(), "Applicazione nascosta!!!",Toast.LENGTH_LONG).show();
			}
		});
	}

}
